
namespace MuDBApp.Models
{
    using System;
    using Seditious.NETMF.MuDB;

    /// <summary>
    /// Represents a customer that purchases products
    /// </summary>
    [Serializable]
    public class Customer
    {
        /// <summary>
        /// The identifying number of the customer.
        /// </summary>
        [PrimaryKey]
        public int Id;

        /// <summary>
        /// The first name of the customer.
        /// </summary>
        public string Firstname;
        
        /// <summary>
        /// The last name of the customer.
        /// </summary>
        public string Lastname;

        /// <summary>
        /// Initializes a new instance of the Customer class.
        /// </summary>
        /// <param name="id">The id of the customer</param>
        /// <param name="firstname">The first name of the customer</param>
        /// <param name="lastname">The last name of the customer</param>
        public Customer(int id, string firstname, string lastname)
        {
            this.Id = id;
            this.Firstname = firstname;
            this.Lastname = lastname;
        }

        /// <summary>
        /// Returns a specially-formatted string of the instance data.
        /// </summary>
        /// <returns>A string of the instance data.</returns>
        public override string ToString()
        {
            return "Id:" + this.Id.ToString() + ", Name: " + this.Firstname + " " + this.Lastname;
        }
    }
}
